import { createApp } from 'vue'
import "./assets/iconfont.css";
import "./assets/iconfont.js";
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import request from '../src/http/http'
import 'element-plus/dist/index.css'
import { ElMessage } from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { Button } from 'vant';
import 'vant/lib/button/style';
import { Field as VanField } from 'vant';
import 'vant/es/field/style';


const app =createApp(App).use(store).use(router)
app.use(ElementPlus, {
  locale: zhCn,
})

app.use(Button);
app.use(VanField);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
  app.config.globalProperties.$http=request
  app.config.globalProperties.$message = ElMessage
  app.mount('#app')
